WaterCAD 2024 Help

Active Topology Queries

Active Topology Queries allow you to use queries to activate/deactivate portions of the system. They provide a mechanism by which data associated with elements can be used to drive the inclusion or exclusion of elements in the topological network (e.g. “turn on elements that were installed in 2020 or earlier”).

If an element is included either by a query (or implicitly – refer to the inferencing process below), then it produces the same outcome as if the Is Active? property of an element was set to True in the Active Topology Alternative. Similarly, if an element is excluded by a query (or implicitly) then it is the same outcome as if the Is Active? property of an element was set to False in the Active Topology Alternative.

To control the Is Active? state of an element (e.g., a pipe) using this method, a query must be provided for that type of element (e.g., pipes) which yields the expected set of elements to be made active (i.e., Is Active? = True).

If no query is provided for a particular element type (e.g., Junctions) then all elements of that type will be made active. So, if you enable Query Based active topology and then do not define any queries at all, when you click the Apply Queries button, all elements of all types will be made active.

There are two approaches for working with active topology queries. To specify which approach you would like to use, change the Automatically include connected elements setting to either On or Off.

Note: The approach most appropriate for any single model is predicated on that hydraulic model including the relevant data that you would like to utilize in your queries, such as Zone and Year Installed/Retired.

Active Topology Queries – Automatically include connected elements is Off.

If the Automatically include connected elements setting is Off, any queries you define will be executed precisely and the outcomes of those queries will be applied to your model to each type of element independent of any relationship or connectivity. Depending on the nature of your queries this may not yield model connectivity that is immediately useful. Users who have suitable properties on their model elements that support executing queries on all those elements may find this option to be the most flexible. Additionally, this option will generally execute more quickly than the alternative option which includes additional processing.

Note: The queries that you define will be executed in their defined order, except that the queries will first be sorted so that all link-based queries execute before any node based or other queries.

Using a modified version of the Example1 sample model to illustrate, the pipes in the model have had the Year Installed property set to the installation year. The Year 2000 Conditions scenario, in this modified model shows the build-out history of the hydraulic network.

If we now execute the following pipe query:

Physical_InstallationYear <= 1987 AND ( Physical_RetirementYear > 1987 OR Physical_RetirementYear = 0)

... we obtain the following outcome when clicking on Apply Queries.

The pipes with a Year Installed value of 1987 or earlier (and Year Retired not in 1987 or earlier) are included in the network (made active) and any pipes built after 1987 are excluded (made inactive). The inactive pipes are shown in light gray for reference.

The most obvious side-effect of this simple approach is that some junction nodes have been orphaned so they will either need to be included in their own query (if appropriate information for those elements is present) or additional work may be required to identify and make inactive any orphaned node elements.

Note: In larger networks a similar situation will exist for other node element types.

Active Topology Queries – Automatically include connected elements is On.

If the Automatically include connected elements setting is On, by default you may only enter a Pipe query and an optional Customer Meter query. Connectivity will be inferred to produce a network connected consistently given the initial connectivity and factoring in certain associations that exist with the model (e.g., isolation valve associations, tap associations and SCADA element associations).

Note: The above inference process does not validate the connectivity of the network hydraulically, and a hydraulically valid network is not guaranteed subject to the initial connectivity in the model.

In most cases the user will find that setting the Automatically include connected elements setting to On will be the most convenient, however, be aware that for large networks the use of this feature comes with additional overhead compared to the approach that only executes the defined queries and does not infer connectivity. The reason for this is that processing the network connectivity can take some time, especially with larger models.

Using the same modified version of the Example1 sample model to illustrate as previously, the pipes in the model have had the Year Installed property set to the installation year. The Year 2000 Conditions scenario, in this modified model shows the build-out history of the hydraulic network.

If we now execute the following pipe query:

Physical_InstallationYear <= 1980 AND ( Physical_RetirementYear > 1980  OR Physical_RetirementYear = 0)

... we obtain the following outcome when clicking on Apply Queries.

The pipes with a Year Installed value of 1980 or earlier (and Year Retired not in 1980 or earlier) are included in the network (made active) and any pipes built after 1980 are excluded (made inactive). The inactive pipes are shown in light gray for reference.

Contrary to the behavior when the Automatically include connected elements setting is Off, we now see that the state of connected node elements has been inferred based on the Is Active? state of the pipes.

The inferencing of connected elements, may vary depending on the type of hydraulic model, but generally includes processing model elements including:
  1. End nodes of affected pipes/links,
  2. Elements that reference affected links or nodes (e.g., isolation valve),
  3. Elements that have associations with affected links or nodes (e.g., SCADA element).
Note: Due to the nature of the additional processing involved, this inferencing process may take up to several minutes on extremely large models (in the range of 1M elements).